package com.nervenets.shopping.hibernate.dao;

import com.nervenets.shopping.hibernate.domain.user.User;
import com.nervenets.shopping.hibernate.domain.user.UserWxId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface UserWxIdDao extends JpaRepository<UserWxId, Long>, JpaSpecificationExecutor<UserWxId> {
    UserWxId findByOpenId(String openId);

    UserWxId findTop1ByUserAndAppId(User user, String appId);
}
